<template>
  <div>

    <div class="Logout">
      <Logout>退出</Logout>
    </div>
    <h1>更新家谱信息</h1>

   <div class="image">
   <el-image :src="src2"></el-image>
   <!-- <el-image :src="src1"></el-image> -->
    </div>



    <el-input style="width: 800px" size="medium" v-model="zno" placeholder="请输入家谱ID" prefix-icon="el-icon-s-check" maxlength="10" show-word-limit clearable></el-input>
    <el-input style="width: 800px" size="medium" v-model="zpartner" placeholder="请输入用户ID" prefix-icon="el-icon-s-management" maxlength="50" show-word-limit clearable></el-input>
   
    <el-input style="width: 800px" size="medium" v-model="zname" placeholder="请输入家谱名称" prefix-icon="el-icon-user-solid" maxlength="50" show-word-limit clearable></el-input>
    
    
    <el-input style="width: 800px" size="medium" v-model="zbirth" placeholder="请输入内容描述" prefix-icon="el-icon-s-data" maxlength="50" show-word-limit clearable></el-input>
    


     <!-- <el-input style="width: 800px" size="medium" v-model="zdie" placeholder="请输入家训" prefix-icon="el-icon-s-management" maxlength="50" show-word-limit clearable></el-input>
     <el-input style="width: 800px" size="medium" v-model="zmarry" placeholder="请输入族长" prefix-icon="el-icon-s-management" maxlength="50" show-word-limit clearable></el-input>

      <el-input style="width: 800px" size="medium" v-model="zaddress" placeholder="请输入族长联系方式" prefix-icon="el-icon-s-management" maxlength="50" show-word-limit clearable></el-input>

     

      <el-input style="width: 800px" size="medium" v-model="zchild" placeholder="请输入姓氏起源" prefix-icon="el-icon-s-management" maxlength="50" show-word-limit clearable></el-input>

      <el-input style="width: 800px" size="medium" v-model="zlife" placeholder="请输入恩荣录" prefix-icon="el-icon-s-management" maxlength="50" show-word-limit clearable></el-input>  -->

       <el-input style="width: 800px" size="medium" v-model="zhonor" placeholder="请输入创建时间" prefix-icon="el-icon-s-management" maxlength="50" show-word-limit clearable></el-input>

     
     
     
   
    <el-row>
      <el-button @click="updateBtn" type="success" icon="el-icon-upload">提交</el-button>
    </el-row>
  </div>
</template>

<script>
import Logout from "./Logout";
export default {
  name: "UpdateZupu",
  components:{Logout},
  created(){
    this.zno = this.$route.query.zno;
    this.zname = this.$route.query.zname;
    this.zbirth = this.$route.query.zbirth;
    this.zdie = this.$route.query.zdie;
     this.zmarry = this.$route.query.zmarry;
    this.zpartner = this.$route.query.zpartner;
    this.zaddress = this.$route.query.zaddress;
    this.zchild = this.$route.query.zchild;
     this.zlife = this.$route.query.zlife;
    this.zhonor = this.$route.query.zhonor;
   
  },
  methods: {
    search(){

    },
    updateBtn(){
      let data = {
        zno:this.zno,
        zname:this.zname,
        zbirth:this.zbirth,
        zdie:this.zdie,
        zmarry :this.zmarry,
        zpartner : this.zpartner,
        zaddress :this.zaddress,
        zchild :this.zchild,
        zlife :this.zlife,
        zhonor :this.zhonor
   



      };
      this.$axios.post(`/EditZupu`,data).then((res) => {
        console.log(res);
        if(res.data ==="更新成功"){
          alert("更新成功");

        } else {
          alert(res.data.msg)
        }
      });


    }
  },

  data() {
    return {

      src2:"https://pic3.zhimg.com/80/v2-51677c306272e9901f9922525aede0ea_720w.jpg",
      zno:'',
      zname:'',
      zbirth:'',
      zdie:'',
        zmarry:'',
      zpartner:'',
      zchild:'',
      zlife:'',
       zhonor:'',
      zaddress:''
   




    }
  }
}
</script>

<style scoped>

</style>
